let http = require('http');
let fs = require('fs');

// 堵塞加载
let data = fs.readFileSync('index.txt');
console.log(data.toString());
http.createServer((req,res) => {
    res.writeHead(200,{'conyent-Type':'text/plain'});
    res.end(data.toString())
}).listen(8888)


console.log('服务器运行在8888端口');